#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

const int maxn = 1e6 + 2000;
int a[maxn] = {389, 207, 155, 300, 299, 170, 158, 65};//
int dp[maxn];//dp[i]��a[i]��β���������еĳ��� 
int n = 8;

int main() {
    dp[0] = 1;
    for (int i = 1; i < n; i++) {
        //a[i]��β a[j]   i>j>=0
        dp[i] = 1;//��a[i]��β���������еĳ���
        for (int j = 0; j < i; j++) {
            if (a[i] <= a[j]) {//dp[j]
                dp[i] = max(dp[i], dp[j] + 1);
            }
        }
    }
    sort(dp, dp + n);
    cout << dp[n - 1];
}
